import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-07-09
 * Time: 18:47
 */
public class test5 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNextInt()) { // 注意 while 处理多个 case
            int n = in.nextInt();
            int x = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            int left = 0, right = 0;
            int ret  = Integer.MAX_VALUE;
            int sum = 0;
            while (right < n) {
                sum += a[right];
                while (sum >= x) {
                    if (right - left + 1 < ret) {
                        ret = right - left + 1;
                        int leftIndex = left;
                        int rightIndex = right;
                    }
                    sum -= a[left];
                    left++;
                }
                right++;
            }
            System.out.print(left);
            System.out.print(" ");
            System.out.println(right);
        }
    }
}
